package com.dl.zd;

import java.util.List;

import org.dom4j.Element;

import com.dl.DL;
import com.dom4j.YM;
//套餐余量查询
public class CX {
	private static Element cElement =null;
	private static String a=null;
	private static List<Element> list=null;
public static void CX(){
	Element element =YM.zxSJH(DL.num,YM.root);
	 list=element.element("密码").elements();
	cx1("通话时间");
	System.out.println("剩余"+a+"分钟");
	cx1("上网流量");
	System.out.println("剩余"+a+"MB");
	cx1("短信条数");
	System.out.println("剩余"+a+"条");
}
static void cx1(String name){
	for(int i=0;i<list.size();i++){
		cElement = list.get(i).element(name);
		if(cElement!=null){
			a = cElement.getText();
			break;
		}
	}
}
}
